package com.atguigu.jinx.enums;

import lombok.Getter;

/**
 * Author:VEGA_KUANGQI
 * <p>
 * 2025/8/14
 */
@Getter
public enum SmsTemplateStatus {

    LOGIN_TEMPLATE("login", "[金克斯RPO]您的登录验证码为:"),
    CHANGE_TEMPLATE("change", "[金克斯RPO]您的修改邮箱的验证码为:"),
    FORGET_TEMPLATE("forget", "[金克斯RPO]您的找回密码验证码为:");

    private final String type;
    private final String content;

    SmsTemplateStatus(String type, String content) {
        this.type = type;
        this.content = content;
    }

    /**
     * 根据 type 获取枚举
     */
    public static SmsTemplateStatus fromType(String type) {
        for (SmsTemplateStatus status : values()) {
            if (status.type.equals(type)) {
                return status;
            }
        }
        return null;
    }
}

